import 'package:flutter_module/common/base/logic/BaseLogic.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/get_state_manager.dart';

///传入logic 命名泛型, 以限制logic的类型
abstract class BasePage<T extends BaseLogic> extends StatefulWidget {
  BasePage({
    super.key,
  });

  GetxController? bind;
  String? tag;

  List<GetxController>? binds;
  List<String>? tags;
}

//Page为命名泛型 继承 BasePage,
//BaseState作为抽象基类，也会被子类继承，所以传入泛型限制参数类型
abstract class BaseState<Page extends BasePage> extends State<Page>
    with WidgetsBindingObserver {
  String screenName();
  GlobalKey<ScaffoldState> scaffoldKey = GlobalKey();
}
